package cn.dong.edu.feign.fillback;

import cn.dong.api.domain.CommonResult;
import cn.dong.edu.feign.VodService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 兜底的解决方案
 */
@Service
@Slf4j
public class VodServiceImpl implements VodService {

    /**
     * 删除视频
     *
     * @param videoId
     * @return
     */
    @Override
    public CommonResult delFile(String videoId) {
        log.info("触发熔断！");
        return CommonResult.error().message("系统繁忙，删除视频失败！");
    }

    /**
     * 批量删除视频
     *
     * @param videoIds
     * @return
     */
    @Override
    public CommonResult deleteByIds(List<String> videoIds) {
        log.info("触发熔断！");
        return CommonResult.error().message("系统繁忙，删除视频失败！");
    }
}
